package com.zjp.mapper;

import com.zjp.pojo.User;
import com.zjp.pojo.UserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface UserMapper {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    /**
     * //根据用户id修改用户健康码状态信息
     *
     * @param userid
     * @return
     */
    @Update("update zjp.user set health_status=2 where  id=#{userid}  ")
    int updateHealthStatusByUserId(Long userid);
}